/*
* ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
* Without permission, no one has the right to obtain, disclose or use this software in any way.
*/

package ecarx.eas.notification.interfaces;

import android.service.notification.StatusBarNotification;

/**
 * FileName: INotificationAPI.java <br>
 * Description : 通知中心的能力接口 <br>
 * Create Time: 2019/12/26 11:12 <br>
 * Update Time: 2021/8/3 14:07 <br>
 *
 * @since 1.0.0
 */
public interface INotificationAPI extends BaseAPI {

    /**
     * * 添加通知中心消息监听.
     * <p> 通知中心数据通过监听回掉的方式夸进程传输到客户端，客户端初始化 API 成功后必须添加消息监听器才可以接收到系统消息 <br>
     *
     * @param onNotificationListener 监听器 {@link OnNotificationListener}
     * @since 1.0.0
     */
    void addNotificationListener(OnNotificationListener onNotificationListener);

    /**
     * * 移除消息监听器.
     * <p> 页面退出无需再监听系统通知消息或重新添加监听器时<br>
     *
     * @param onNotificationListener {@link OnNotificationListener} 监听器
     * @see #addNotificationListener(OnNotificationListener)
     * @since 1.0.0
     */
    void removeNotificationListener(OnNotificationListener onNotificationListener);

    /**
     * * 客户端取消通知.
     * <p> 客户端主动取消通知，并通知到系统 Launcher Controller <br>
     *
     * @param key {@link StatusBarNotification#getKey()}
     * @since 1.0.0
     */
    void cancelNotification(String key);

    /**
     * * 取消所有通知.
     * <p> 客户端主动取消所有通知，并通知到系统 Launcher Controller <br>
     * @since 1.0.0
     */
    void cancelAllNotifications();

}
